; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__SPEECHRECOGNITION__') = 'UNDEFINED' THEN
__SPEECHRECOGNITION__ SET 1
IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
include 'Memory.a'
ENDIF
gestaltSpeechRecognitionVersion EQU 'srtb'
gestaltSpeechRecognitionAttr EQU 'srta'
gestaltDesktopSpeechRecognition EQU $00000001
gestaltTelephoneSpeechRecognition EQU $00000002
; Error Codes [Speech recognition gets -5100 through -5199]
kSRNotAvailable EQU -5100 ; the service requested is not avail or applicable
kSRInternalError EQU -5101 ; a system internal or hardware error condition
kSRComponentNotFound EQU -5102 ; a needed system resource was not located
kSROutOfMemory EQU -5103 ; an out of memory error occurred in the toolbox memory space
kSRNotASpeechObject EQU -5104 ; the object specified is no longer or never was valid
kSRBadParameter EQU -5105 ; an invalid parameter was specified
kSRParamOutOfRange EQU -5106 ; when we say 0-100, don't pass in 101.
kSRBadSelector EQU -5107 ; an unrecognized selector was specified
kSRBufferTooSmall EQU -5108 ; returned from attribute access functions
kSRNotARecSystem EQU -5109 ; the object used was not a SRRecognitionSystem
kSRFeedbackNotAvail EQU -5110 ; there is no feedback window associated with SRRecognizer
kSRCantSetProperty EQU -5111 ; a non-settable property was specified
kSRCantGetProperty EQU -5112 ; a non-gettable property was specified
kSRCantSetDuringRecognition EQU -5113 ; the property can't be set while recognition is in progress -- do before or between utterances.
kSRAlreadyListening EQU -5114 ; in response to SRStartListening
kSRNotListeningState EQU -5115 ; in response to SRStopListening
kSRModelMismatch EQU -5116 ; no acoustical models are avail to match request
kSRNoClientLanguageModel EQU -5117 ; trying to access a non-specified SRLanguageModel
kSRNoPendingUtterances EQU -5118 ; nothing to continue search on
kSRRecognitionCanceled EQU -5119 ; an abort error occurred during search
kSRRecognitionDone EQU -5120 ; search has finished, but nothing was recognized
kSROtherRecAlreadyModal EQU -5121 ; another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now
kSRHasNoSubItems EQU -5122 ; SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM.
kSRSubItemNotFound EQU -5123 ; returned when accessing a non-existent sub item of a container
kSRLanguageModelTooBig EQU -5124 ; Cant build language models so big
kSRAlreadyReleased EQU -5125 ; this object has already been released before
kSRAlreadyFinished EQU -5126 ; the language model can't be finished twice
kSRWordNotFound EQU -5127 ; the spelling couldn't be found in lookup(s)
kSRNotFinishedWithRejection EQU -5128 ; property not found because the LMObj is not finished with rejection
kSRExpansionTooDeep EQU -5129 ; Language model is left recursive or is embedded too many levels
kSRTooManyElements EQU -5130 ; Too many elements added to phrase or path or other langauge model object
kSRCantAdd EQU -5131 ; Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject)
kSRSndInSourceDisconnected EQU -5132 ; Sound input source is disconnected
kSRCantReadLanguageObject EQU -5133 ; An error while trying to create new Language object from file or pointer -- possibly bad format
; non-release debugging error codes are included here
kSRNotImplementedYet EQU -5199 ; you'd better wait for this feature in a future release
; Type Definitions
; typedef SRSpeechObject SRRecognitionSystem
; typedef SRSpeechObject SRRecognizer
; typedef SRSpeechObject SRSpeechSource
; typedef SRSpeechSource SRRecognitionResult
; typedef SRSpeechObject SRLanguageObject
; typedef SRLanguageObject SRLanguageModel
; typedef SRLanguageObject SRPath
; typedef SRLanguageObject SRPhrase
; typedef SRLanguageObject SRWord
; between 0 and 100
; typedef unsigned short SRSpeedSetting
; between 0 and 100
; typedef unsigned short SRRejectionLevel
; When an event occurs, the user supplied proc will be called with a pointer
; to the param passed in and a flag to indicate conditions such
; as interrupt time or system background time.
SRCallBackStruct RECORD 0
what ds.l 1 ; offset: $0 (0) ; one of notification flags
kSRNotifyRecognitionBeginning EQU $00000001 ; recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition
kSRNotifyRecognitionDone EQU $00000002 ; recognition has terminated. result (if any) is available.
; Apple Event selectors
; AppleEvent message class
kAESpeechSuite EQU 'sprc'
; AppleEvent message event ids
kAESpeechDone EQU 'srsd'
kAESpeechDetected EQU 'srbd'
; AppleEvent Parameter ids
keySRRecognizer EQU 'krec'
keySRSpeechResult EQU 'kspr'
keySRSpeechStatus EQU 'ksst'
; AppleEvent Parameter types
typeSRRecognizer EQU 'trec'
typeSRSpeechResult EQU 'tspr'
; SRRecognizer Properties
kSRNotificationParam EQU 'noti' ; see notification flags below
kSRCallBackParam EQU 'call' ; type SRCallBackParam
kSRSearchStatusParam EQU 'stat' ; see status flags below
kSRAutoFinishingParam EQU 'afin' ; automatic finishing applied on LM for search
kSRForegroundOnly EQU 'fgon' ; Boolean. Default is true. If true, client recognizer only active when in foreground.
kSRBlockBackground EQU 'blbg' ; Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.
kSRBlockModally EQU 'blmd' ; Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods!
kSRWantsResultTextDrawn EQU 'txfb' ; Boolean. Default is true. If true, search results are posted to Feedback window
kSRWantsAutoFBGestures EQU 'dfbr' ; Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior
kSRSoundInVolume EQU 'volu' ; short in [0..100] log scaled sound input power. Can't set this property
kSRReadAudioFSSpec EQU 'aurd' ; *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF
kSRCancelOnSoundOut EQU 'caso' ; Boolean: Default is true. If any sound is played out during utterance, recognition is aborted.
kSRSpeedVsAccuracyParam EQU 'sped' ; SRSpeedSetting between 0 and 100
; 0 means more accurate but slower.
; 100 means (much) less accurate but faster.
kSRUseToggleListen EQU 0 ; listen key modes
kSRUsePushToTalk EQU 1
kSRListenKeyMode EQU 'lkmd' ; short: either kSRUseToggleListen or kSRUsePushToTalk
kSRListenKeyCombo EQU 'lkey' ; short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message